package com.yanqu.road.entity.activity.bowart.enums;

public enum eWindDirection {

    East(1, "东", 1, 0),
    West(2, "西", -1, 0),
    SouthEast(3, "东南", 1, -1),
    NorthEast(4, "东北", 1, 1),
    SouthWest(5, "西南", -1, -1),
    NorthWest(6, "西北", -1, 1),

    ;

    int intValue;

    String name;

    int offsetX;

    int offsetY;

    eWindDirection(int intValue, String name, int offsetX, int offsetY) {
        this.intValue = intValue;
        this.name = name;
        this.offsetX = offsetX;
        this.offsetY = offsetY;
    }

    public int getIntValue() {
        return intValue;
    }

    public void setIntValue(int intValue) {
        this.intValue = intValue;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getOffsetX() {
        return offsetX;
    }

    public void setOffsetX(int offsetX) {
        this.offsetX = offsetX;
    }

    public int getOffsetY() {
        return offsetY;
    }

    public void setOffsetY(int offsetY) {
        this.offsetY = offsetY;
    }

    public static eWindDirection forValue(int directionId) {
        for (eWindDirection type : values()) {
            if (type.getIntValue() == directionId) {
                return type;
            }
        }
        return null;
    }
}
